package oop2.ch6;

import oop2.JavaClass2;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class XueshihouTest {
    public static void main(String[] args) {
        PostBachelorClass j = new PostBachelorClass();
        j.name = "java79";
        j.teacherName = "老李";
        Scanner in = new Scanner(System.in);
        int choice = 0;
        while (true) {
            System.out.println("1:加新人，2：查看班级情况，3：查找，4：按照区间查找, 5:开除学生，9：退出");
            choice = in.nextInt();
            if (choice == 1) {
                System.out.print("输入学号：");
                String no=in.next();
                System.out.print("输入姓名：");
                String name=in.next();
                System.out.print("输入专业：");
                String z=in.next();
                System.out.print("输入手机号：");
                String phone=in.next();
                JavaStudent jv=new JavaStudent(name,no,z,phone);
                boolean b=j.in(jv);
                System.out.println(b?"成功":"失败");
            } else if (choice == 2) {
                j.show();
            } else if (choice == 3) {

            } else if (choice == 4) {

            } else if (choice == 5) {

            } else if (choice == 9) {
                break;
            }
        }
    }
}
